package referenceTest;

import java.io.IOException;
import java.lang.ref.WeakReference;

//弱引用【只要遇到垃圾回收就被回收】
public class T03_WeakReference {

    public static void main(String[] args) throws IOException {
        WeakReference<M> m = new WeakReference<>(new M(10, "1"));
        System.gc();
        System.in.read();

    }
}
